package com.briup.day37;

import java.io.FileInputStream;
import java.io.InputStream;

public class IODemo1 {

	public static void main(String[] args) throws Exception {
		
		String path = "src/com/briup/day37/demo1.txt";
		InputStream is = new FileInputStream(path);
		
		//可读取到的字节数量
		System.out.println("available:"+ is.available());
		
		//每次读取一个字节
		
		/*for (int i = 0; i < is.available(); ) {
			System.out.println(is.read());
		}*/
		
		int i ;
		while ((i = is.read()) != -1) {
			System.out.println((char)i);
			
		}
	

	}

}
